package com.reflection.cglib;

import net.sf.cglib.proxy.Enhancer;

public class Test {
	public static void main(String[] args) {
		Enhancer enhancer = new Enhancer();
		enhancer.setCallback(new MyMethodInterceptor());
		enhancer.setSuperclass(MyClass.class);
		
		MyClass testClass = (MyClass)enhancer.create();
		System.out.println(testClass.getUserName());
	}
}
